* Opportunites to Use Force *

use kriner_schickler_ch5_replication_opportunities.dta, clear

* Figure 5.1 *
hist misconductdayslastyear if firstyear !=1, bin(45) freq

* Table 5.1 *
logit bothdv  misconductdayslastyear regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1 & firstyear !=1, cluster(ccodeprez)
outreg2 using table5.1, word drop( regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2) label dec(3) replace
logit bothdv  misconductdayslastyear avgppcong regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1 & firstyear !=1, cluster(ccodeprez)
outreg2 using table5.1, word drop(regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2) label dec(3) append
logit bothdv  misconductdayslastyear avgppcong approvalt1 regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1 & firstyear !=1, cluster(ccodeprez)
outreg2 using table5.1, word drop(regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2) label dec(3) append
logit bothdv misconductdayslastyear avgppcong approvalt1  unemp cpi  electionyear milheg ongomid  majpow_b  democracy  alliancesjp  trade sovallyCW89plus lncaprat back30 numongoingopps  logtroop   regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1 & firstyear !=1, cluster(ccodeprez)
outreg2 using table5.1, word drop( regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2) label dec(3) append

* Table 5.2 *
logit bothdv  misconductdayslastyear oversightdayslastyear regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1 & firstyear !=1, cluster(ccodeprez)
outreg2 using table5.2, word drop( regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2) label dec(3) replace
logit bothdv  misconductdayslastyear oversightdayslastyear avgppcong regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1 & firstyear !=1, cluster(ccodeprez)
outreg2 using table5.2, word drop(regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2) label dec(3) append
logit bothdv  misconductdayslastyear oversightdayslastyear avgppcong approvalt1 regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1 & firstyear !=1, cluster(ccodeprez)
outreg2 using table5.2, word drop(regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2) label dec(3) append
logit bothdv misconductdayslastyear oversightdayslastyear avgppcong approvalt1  unemp cpi  electionyear milheg ongomid  majpow_b  democracy  alliancesjp  trade sovallyCW89plus lncaprat back30 numongoingopps  logtroop   regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1 & firstyear !=1, cluster(ccodeprez)
outreg2 using table5.2, word drop( regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2) label dec(3) append

* Appendix Table 5.1 *

logit bothdv misconductdayslastyear avgppcong approvalt1  unemp cpi  electionyear milheg ongomid  majpow_b  democracy  alliancesjp  trade sovallyCW89plus lncaprat back30 numongoingopps  logtroop   regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1 & firstyear !=1, cluster(ccodeprez)
outreg2 using appendixtable5.1, word drop(regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2) label dec(3) replace
logit bothdv  misconductdayslastyear avgppcong approvalt1 unemp cpi approvalt1 electionyear milheg ongomid  majpow_b  democracy  alliancesjp  trade sovallyCW89plus lncaprat back30 numongoingopps  logtroop   regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1 & firstyear2 !=1, cluster(ccodeprez)
outreg2 using appendixtable5.1, word drop(regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2) label dec(3) append
logit bothdv  misconductdayslastyear avgppcong approvalt1 unemp cpi approvalt1 electionyear milheg ongomid  majpow_b  democracy  alliancesjp  trade sovallyCW89plus lncaprat back30 numongoingopps  logtroop   regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1 & firstyear3 !=1, cluster(ccodeprez)
outreg2 using appendixtable5.1, word drop(regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2) label dec(3) append
logit bothdv  misconductdayslastyear avgppcong approvalt1 unemp cpi approvalt1 electionyear milheg ongomid  majpow_b  democracy  alliancesjp  trade sovallyCW89plus lncaprat back30 numongoingopps  logtroop   regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1, cluster(ccodeprez)
outreg2 using appendixtable5.1, word drop(regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2) label dec(3) append

* Appendix Table 5.2 *
logit bothdv  misconductdayslastyear regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1 & firstyear !=1, cluster(ccodeprez)
outreg2 using appendixtable5.2, word drop( regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2) label dec(3) replace
logit bothdv  misconductdayslastyear dg regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1 & firstyear !=1, cluster(ccodeprez)
outreg2 using appendixtable5.2, word drop(regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2) label dec(3) append
logit bothdv  misconductdayslastyear dg approvalt1 regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1 & firstyear !=1, cluster(ccodeprez)
outreg2 using appendixtable5.2, word drop(regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2) label dec(3) append
logit bothdv misconductdayslastyear dg approvalt1  unemp cpi  electionyear milheg ongomid  majpow_b  democracy  alliancesjp  trade sovallyCW89plus lncaprat back30 numongoingopps  logtroop   regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1 & firstyear !=1, cluster(ccodeprez)
outreg2 using appendixtable5.2, word drop( regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2) label dec(3) append

* Robustness check in footnote -- robust to dropping outliers or using natural log *
gen lnmisconductdayslastyear = ln(misconductdayslastyear)
logit bothdv lnmisconductdayslastyear avgppcong approvalt1  unemp cpi  electionyear milheg ongomid  majpow_b  democracy  alliancesjp  trade sovallyCW89plus lncaprat back30 numongoingopps  logtroop   regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1 & firstyear !=1, cluster(ccodeprez)
logit bothdv misconductdayslastyear avgppcong approvalt1  unemp cpi  electionyear milheg ongomid  majpow_b  democracy  alliancesjp  trade sovallyCW89plus lncaprat back30 numongoingopps  logtroop   regNCAmerica regMidEast regAfrica regAsiaPacific regWEurope regEEurope truman2-bush2 if allexcl6 !=1 & firstyear !=1 & misconductdayslastyear < 280, cluster(ccodeprez)

* Scale of Use of Force *

use kriner_schickler_ch5_replication_scale.dta, clear

* Difference in means test -- presented in text *
ttest misconductdayslastyear, by(majoruse)

* Table 5.3 *
  logit majoruse misconductdayslastyear if firstyear !=1, robust
outreg2 using table5.3, word  label dec(3)  replace 
logit majoruse  misconductdayslastyear avgppcong if firstyear !=1, robust
outreg2 using table5.3, word  label dec(3)  append 
logit majoruse  misconductdayslastyear avgppcong laggedapproval if firstyear !=1, robust
outreg2 using table5.3, word  label dec(3)  append 
logit majoruse  misconductdayslastyear avgppcong laggedapproval newtotmilexadjinflin100bills newtotmilperinmills newmidist s_wt_reg  war electionyear laggedapproval unemp cpi if firstyear !=1, robust
outreg2 using table5.3, word  label dec(3)  append 

* Table 5.4 *
logit majoruse misconductdayslastyear oversightdayslastyear if firstyear !=1, robust
outreg2 using table5.4, word  label dec(3)  replace 
logit majoruse  misconductdayslastyear oversightdayslastyear avgppcong if firstyear !=1, robust
outreg2 using table5.4, word  label dec(3)  append 
logit majoruse  misconductdayslastyear oversightdayslastyear avgppcong laggedapproval if firstyear !=1, robust
outreg2 using table5.4, word  label dec(3)  append 
logit majoruse  misconductdayslastyear oversightdayslastyear avgppcong laggedapproval newtotmilexadjinflin100bills newtotmilperinmills newmidist s_wt_reg  war  electionyear laggedapproval unemp cpi if firstyear !=1, robust
outreg2 using table5.4, word  label dec(3)  append 

* Appendix Table 5.3 *
logit majoruse  misconductdayslastyear avgppcong laggedapproval newtotmilexadjinflin100bills newtotmilperinmills newmidist s_wt_reg  war  electionyear laggedapproval unemp cpi if firstyear !=1, robust
outreg2 using appendixtable5.3, word  label dec(3) replace 
logit majoruse    misconductdayslastyear avgppcong laggedapproval newtotmilexadjinflin100bills newtotmilperinmills newmidist s_wt_reg  war  electionyear  unemp cpi if firstyear2 !=1, robust
outreg2 using appendixtable5.3, word  label dec(3) append 
logit majoruse    misconductdayslastyear avgppcong laggedapproval newtotmilexadjinflin100bills newtotmilperinmills newmidist s_wt_reg  war  electionyear  unemp cpi if firstyear3 !=1, robust
outreg2 using appendixtable5.3, word  label dec(3) append 
logit majoruse    misconductdayslastyear avgppcong laggedapproval newtotmilexadjinflin100bills newtotmilperinmills newmidist s_wt_reg  war  electionyear  unemp cpi, robust
outreg2 using appendixtable5.3, word  label dec(3) append 

* Appendix Table 5.4 *
logit majoruse misconductdayslastyear if firstyear !=1, robust
outreg2 using appendixtable5.4, word  label dec(3)  replace 
logit majoruse  misconductdayslastyear dg if firstyear !=1, robust
outreg2 using appendixtable5.4, word  label dec(3)  append 
logit majoruse  misconductdayslastyear dg laggedapproval if firstyear !=1, robust
outreg2 using appendixtable5.4, word  label dec(3)  append 
logit majoruse  misconductdayslastyear dg laggedapproval newtotmilexadjinflin100bills newtotmilperinmills newmidist s_wt_reg  war  electionyear laggedapproval unemp cpi if firstyear !=1, robust
outreg2 using appendixtable5.4, word  label dec(3)  append 

* Robusntess check in footnote -- robust to dropping outliers or using natural log *
gen lnmisconductdayslastyear = ln(misconductdayslastyear)
logit majoruse  lnmisconductdayslastyear avgppcong laggedapproval newtotmilexadjinflin100bills newtotmilperinmills newmidist s_wt_reg  war electionyear laggedapproval unemp cpi if firstyear !=1, robust
logit majoruse  misconductdayslastyear avgppcong laggedapproval newtotmilexadjinflin100bills newtotmilperinmills newmidist s_wt_reg  war electionyear laggedapproval unemp cpi if firstyear !=1 & misconductdayslastyear < 260, robust
